using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using RealState.BusinessObjects;
using RealState.DAL;

namespace RealState.BLL
{
	public class ContentExtrasBLL
	{
		private ContentExtrasDAO _ContentExtrasDAO;

		public ContentExtrasDAO ContentExtrasDAO
		{
			get { return _ContentExtrasDAO; }
			set { _ContentExtrasDAO = value; }
		}

		public ContentExtrasBLL()
		{
			ContentExtrasDAO = new ContentExtrasDAO();
		}
		public List<ContentExtras> GetContentExtrass()
		{
			try
			{
				return ContentExtrasDAO.GetContentExtrass();
			}
			catch(Exception ex)
			{
				throw ex;
			}
		}
		public ContentExtras GetContentExtras(int ContentId)
		{
			try
			{
				return ContentExtrasDAO.GetContentExtras(ContentId);
			}
			catch(Exception ex)
			{
				throw ex;
			}
		}
		public int AddContentExtras(ContentExtras oContentExtras)
		{
			try
			{
				return ContentExtrasDAO.AddContentExtras(oContentExtras);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int UpdateContentExtras(ContentExtras oContentExtras)
		{
			try
			{
				return ContentExtrasDAO.UpdateContentExtras(oContentExtras);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int RemoveContentExtras(ContentExtras oContentExtras)
		{
			try
			{
				return ContentExtrasDAO.RemoveContentExtras(oContentExtras);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int RemoveContentExtras(int ContentId)
		{
			try
			{
				return ContentExtrasDAO.RemoveContentExtras(ContentId);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public List<ContentExtras> DeserializeContentExtrass(string Path)
		{
			try
			{
				return GenericXmlSerializer<List<ContentExtras>>.Deserialize(Path);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public void SerializeContentExtrass(string Path, List<ContentExtras> ContentExtrass)
		{
			try
			{
				GenericXmlSerializer<List<ContentExtras>>.Serialize(ContentExtrass, Path);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
	}
}
